this.BX=this.BX||{};this.BX.Landing=this.BX.Landing||{};(function(e,i,s,t,n,o,a,l,r,c){"use strict";const d="crm_webform";var g=babelHelpers.classPrivateFieldLooseKey("cache");var _=babelHelpers.classPrivateFieldLooseKey("getFeaturesPopup");var p=babelHelpers.classPrivateFieldLooseKey("showPhoneVerifySlider");class L extends s.EventEmitter{constructor(e={}){super();Object.defineProperty(this,p,{value:E});Object.defineProperty(this,_,{value:N});Object.defineProperty(this,g,{writable:true,value:new i.Cache.MemoryCache});this.setEventNamespace("BX.Landing.Form.SharePopup");this.subscribeFromOptions(e.events);this.setOptions(e)}setOptions(e){babelHelpers.classPrivateFieldLooseBase(this,g)[g].set("options",{...e})}getOptions(){return babelHelpers.classPrivateFieldLooseBase(this,g)[g].get("options",{})}show(){babelHelpers.classPrivateFieldLooseBase(this,_)[_]().show()}hide(){babelHelpers.classPrivateFieldLooseBase(this,_)[_]().hide()}}function N(){return babelHelpers.classPrivateFieldLooseBase(this,g)[g].remember("featuresPopup",(()=>new t.FeaturesPopup({bindElement:this.getOptions().bindElement,items:[{id:"share",title:n.Loc.getMessage("LANDING_FORM_SHARE__SHARE_TITLE"),theme:t.FeaturesPopup.Themes.Highlight,icon:{className:"landing-form-features-share-icon"},link:{label:n.Loc.getMessage("LANDING_FORM_SHARE__SHARE_LINK_LABEL"),onClick:()=>{if(!i.Type.isNil(BX.Helper)){BX.Helper.show("redirect=detail&code=13003062")}}},actionButton:{label:n.Loc.getMessage("LANDING_FORM_SHARE__SHARE_ACTION_LABEL"),onClick:()=>{const e=o.PageObject.getEditorWindow();const{formEditorData:s}=e.BX.Landing.Env.getInstance().getOptions();if(i.Type.isPlainObject(s)&&i.Type.isPlainObject(s.formOptions)){var t;if((t=this.getOptions())!=null&&t.phoneVerified){l.Embed.openSlider(s.formOptions.id)}else{babelHelpers.classPrivateFieldLooseBase(this,p)[p](s.formOptions.id).then((e=>{if(e){l.Embed.openSlider(s.formOptions.id)}}))}}}}},{id:"communication",title:n.Loc.getMessage("LANDING_FORM_SHARE__COMMUNICATION_TITLE"),icon:{className:"landing-form-features-communication-icon"},link:{label:n.Loc.getMessage("LANDING_FORM_SHARE__COMMUNICATION_LINK_LABEL"),onClick:()=>{if(!i.Type.isNil(BX.Helper)){BX.Helper.show("redirect=detail&code=6986667")}}},actionButton:{label:n.Loc.getMessage("LANDING_FORM_SHARE__COMMUNICATION_ACTION_LABEL"),onClick:()=>{const{landingParams:e}=o.PageObject.getRootWindow();if(!i.Type.isNil(e)&&i.Type.isStringFilled(e.PAGE_URL_LANDING_SETTINGS)){const s=i.Reflection.getClass("BX.SidePanel");if(!i.Type.isNil(s)){s.Instance.open(`${e["PAGE_URL_LANDING_SETTINGS"]}#b24widget`)}}}}},[{id:"help",title:n.Loc.getMessage("LANDING_FORM_SHARE__HELP_TITLE"),icon:{className:"landing-form-features-help-icon"},link:{label:n.Loc.getMessage("LANDING_FORM_SHARE__HELP_LINK_LABEL"),onClick:()=>{const e=i.Reflection.getClass("BX.UI.Feedback");if(!i.Type.isNil(e)){e.Form.open({id:"form-editor-feedback-form",portalUri:"https://bitrix24.team",forms:[{id:1847,lang:"ru",sec:"bbih83",zones:["ru"]},{id:1852,lang:"kz",sec:"dtw568",zones:["kz"]},{id:1851,lang:"by",sec:"nnz05i",zones:["by"]},{id:1855,lang:"en",sec:"6lxt2y",zones:["en","eu","in","uk"]},{id:1856,lang:"de",sec:"574psk",zones:["de"]},{id:1857,lang:"la",sec:"9tlqqk",zones:["es","mx","co"]},{id:1858,lang:"br",sec:"9ptdnu",zones:["com.br"]},{id:1859,lang:"pl",sec:"aynrqw",zones:["pl"]},{id:1860,lang:"fr",sec:"ld3bh8",zones:["fr"]},{id:1861,lang:"it",sec:"1rlv2j",zones:["it"]},{id:1862,lang:"vn",sec:"5m169k",zones:["vn"]},{id:1863,lang:"tr",sec:"2mc2tg",zones:["com.tr"]}],defaultForm:{id:1855,lang:"en",sec:"6lxt2y"}})}}}},{id:"settings",icon:{className:"landing-form-features-settings-icon"},onClick:()=>{const{landingParams:e}=o.PageObject.getRootWindow();if(!i.Type.isNil(e)&&i.Type.isStringFilled(e.PAGE_URL_LANDING_SETTINGS)){const s=i.Reflection.getClass("BX.SidePanel");if(!i.Type.isNil(s)){s.Instance.open(e["PAGE_URL_LANDING_SETTINGS"])}}}}]]})))}function E(e){if(typeof c.PhoneVerify!=="undefined"){return c.PhoneVerify.getInstance().setEntityType(d).setEntityId(e).startVerify({sliderTitle:n.Loc.getMessage("LANDING_FORM_PHONE_VERIFY_CUSTOM_SLIDER_TITLE"),title:n.Loc.getMessage("LANDING_FORM_PHONE_VERIFY_CUSTOM_TITLE"),description:n.Loc.getMessage("LANDING_FORM_PHONE_VERIFY_CUSTOM_DESCRIPTION")})}return Promise.resolve(true)}e.SharePopup=L})(this.BX.Landing.Form=this.BX.Landing.Form||{},BX,BX.Event,BX.Landing,BX.Landing,BX.Landing,BX.Landing,BX.Crm.Form,BX,BX.Bitrix24);
//# sourceMappingURL=share-popup.bundle.map.js